﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using DLV.Utilities;

namespace DLV.Data.Entities
{
    public class VisaPriceController
    {
        public int InsertVisaPrice(VisaPriceInfo info)
        {
            return SQL.InsertVisaPrice(info.VisaId, info.VisaTypeId, info.RegisterNational, info.NationalId, info.Price, info.CreatedBy, info.CreatedDate, info.UpdatedBy, info.UpdatedDate, info.Status, info.Stranlate, info.OtherCosts,info.AgeId, info.VisaQuantity,info.TotalPrice);
        }
        public void UpdateVisaPrice(VisaPriceInfo info)
        {
            SQL.UpdateVisaPrice(info.VisaPriceId, info.VisaId, info.VisaTypeId, info.RegisterNational, info.NationalId, info.Price, info.CreatedBy, info.CreatedDate, info.UpdatedBy, info.UpdatedDate, info.Status, info.Stranlate, info.OtherCosts, info.AgeId, info.VisaQuantity, info.TotalPrice);
        }
        public void DeleteVisaPrice(VisaPriceInfo info)
        {
            DeleteVisaPrice(info.VisaPriceId);
        }
        public void DeleteVisaPrice(int visaPriceId)
        {
            SQL.DeleteVisaPrice(visaPriceId);
        }
        public VisaPriceInfo GetVisaPrice(int visaPriceId)
        {
            return CBO.FillObject<VisaPriceInfo>(SQL.GetVisaPrice(visaPriceId));
        }
        public List<VisaPriceInfo> ListVisaPrice()
        {
            return CBO.FillCollection<VisaPriceInfo>(SQL.ListVisaPrice());
        }
        public DataTable SelectVisaPrice()
        {
            return CBO.ConvertToDataTable(ListVisaPrice(), typeof(VisaPriceInfo));
        }
        public List<VisaPriceInfo> ListVisaPriceByIds(string visaPriceIds)
        {
            return CBO.FillCollection<VisaPriceInfo>(SQL.ListVisaPriceByIds(visaPriceIds));
        }
        public List<VisaPriceInfo> ListPriceByVisa(int partnerId, int visaTypeId)
        {
            return CBO.FillCollection<VisaPriceInfo>(SQL.ListPriceByVisa(partnerId,   visaTypeId));
        }
    }
}
